<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/public/header.jsp"%>
<% 
	String start_date = request.getParameter("start_date") == null ? "" : request.getParameter("start_date");
	String end_date = request.getParameter("end_date") == null ? "" : request.getParameter("end_date");
	String dept_id = request.getParameter("dept_id") == null ? "" : request.getParameter("dept_id");
	String type = request.getParameter("type") == null ? "" : request.getParameter("type");
%>
<html>
<head>
<title>工单管理</title>
</head>
<script type="text/javascript">
		$(function(){
			$("#table").datagrid({
				title:"工单管理",
				iconCls:'icon-edit',
				loadMsg:'正在加载数据，请稍后......',
				url:'<%=contextPath%>/springMVC/statistic/listPageGDBase?end_date=<%=end_date%>&dept_id=<%=dept_id%>&type=<%=type%>&start_date=<%=start_date%>',
				rownumbers:true,
				singleSelect:true,
				fitColumns:true,
				nowrap:false,
				idField:'id',
				frozenColumns:[[
				    {title:'主键',field:'id',hidden:true}
				]],
				columns:[[
					{title:'工单依据',field:'gd_depand_name',width:100,align:'center'},
					{title:'工单状态',field:'gd_status',hidden:true},
					{title:'工单进度',field:'gd_status_desc',width:100,align:'center'},
					{title:'开工日期',field:'gd_start',width:100,align:'center'},
					{title:'所属部门',field:'dept_name',width:100,align:'center'},
					{title:'工单编号',field:'gd_code',width:100,align:'center'},
					{title:'工单名称',field:'gd_name',width:200,align:'center'},
					{title:'工单负责人',field:'gd_admin_name',width:50,align:'center'},
					{title:'实施单位',field:'gd_worker_name',width:100,align:'center'},
					{title:'归属项目编号',field:'xm_code',width:100,align:'center'},
				    {title:'归属项目名称',field:'xm_name',width:200,align:'center'}
				]],
				pageSize:10,
				pageList : [10,50,100],  
				pagination:true,
				onLoadSuccess:function(rtJson){
					if(rtJson.rtState== '1')
					{
						$.messager.alert('提示',rtJson.rtMsrg);
					}
				}
			});
		});
</script>
<body style="height: 97%">
	<div id="table" data-options="fit:true"></div>
</body>
</html>
